<?php
    $thuoctinh = $_SESSION['readonly'];
    $madean = $_SESSION['madean'];
    $tendean = $_SESSION['tendean'];
    $diadiemda = $_SESSION['diadiemda'];
    $maphong = $_SESSION['maphong'];
    $ghichu = $_SESSION['ghichu'];
    $action = $_SESSION['action'];
?>
    <div id="caidat">
        <div class="formHeader">
            <p> <?php echo $_SESSION['tenfrm'] ;?></p>
        
        </div>
        <div id="formContent">
            <form action="<?php echo $action; ?>" method="post" id="frmdean" name="frmdean" onsubmit="return kiemtrafrm();">
                <table cellspacing = 0 cellpadding =0>
                    <tr>
                        <td align="right">Mã Đề án</td>
                        
                        <td>
                            <input type="text" size="30" id="madean" name="madean" value="<?php echo $madean; ?>" <?php echo $thuoctinh; ?>  />
                        </td>
                    
                    </tr>

                    <tr>
                        <td align="right">Tên Đề án</td>
                        
                        <td>
                            <input type="text" size="30" id="tendean" name="tendean" value="<?php echo $tendean; ?>" />
                        </td>
                    
                    </tr>
                    
                    <tr>
                        <td align="right">Địa điểm</td>
                        
                        <td>
                            <input type="text" size="30" id="diadiemda" name="diadiemda" value="<?php echo $diadiemda; ?>" />
                        </td>
                    
                    </tr>
                    
                   
                    <tr>
                    
                        
                        <td align="right">Mã phòng</td>
                    <?php

                        //include "../util/dataUtil.php";
                        $sql_load_maphong = "select MaPhong from phongban";
                        $kq_maphong = executeQuery($sql_load_maphong);
                        
                        echo "<td>
                            <select name='maphong'>";
                            
                        while ($mp = mysql_fetch_array($kq_maphong)) {   
                        echo "
                            <option value = '".$mp_select=$mp['MaPhong']."'"; 
                            
                            if ($mp_select['MaPhong']==$maphong){echo "selected='true'";}
                            
                            echo ">".$mp_select=$mp['MaPhong']."</option>";
                            
                            }
                        
                        echo"</select></td>";
                        
                        
                        
                    ?>
                    </tr>
                    
                    <tr>
                        <td align="right">Ghi chú</td>
                        
                        <td>
                            <input type="text" size="30" id="ghichu" name="ghichu" value="<?php echo $ghichu; ?>" />
                        </td>
                    
                    </tr>
                    
                                        
                    <tr>
                        <td colspan="3" align ="center">
                            <input type="submit" value="Lưu Lại" id="themMoi" name="themMoi"/>
                            <input type="reset" value="Nhập Lại" id="nhapLai" name="nhapLai" onclick="clearTextbox();" />
                        </td>
 
                    </tr>
                    
                </table>
            </form>
        </div>
    </div>
    <div class="statusindex">
                <p> <?php echo $_SESSION['thongbao']; unset ($_SESSION['thongbao']);  ?></p>
    </div>
